// 用户相关的API
import axiosInstance from '@/utils/request.ts'
import type {
  loginForm,
  loginResponseData,
  userResponseData,
} from '@/api/user/type.ts'

enum API {
  LOGIN_URL = '/user/login',
  USERINFO_URL = '/user/info',
}

export const reqLogin = (data: loginForm) =>
  axiosInstance.post<any, loginResponseData>(API.LOGIN_URL, data)
export const reqUserInfo = () =>
  axiosInstance.get<any, userResponseData>(API.USERINFO_URL)
